<?php
/**
 * Copyright © 2016 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */

// @codingStandardsIgnoreFile

/**
 * Product view template
 *
 * @see \Magento\Catalog\Block\Product\View\Description
 */
?>
<?php
$_helper = $this->helper('Magento\Catalog\Helper\Output');
$_product = $block->getProduct();
$_call = $block->getAtCall();
$_code = $block->getAtCode();
$_className = $block->getCssClass();
$_attributeLabel = $block->getAtLabel();
$_attributeType = $block->getAtType();
$_attributeAddAttribute = $block->getAddAttribute();


$sd = <<<SHORT_DESCRIPTION
<div class="askInfo"><em class="porto-icon-info"></em><span>此处价格仅为参考。关于此商品的详细信息，请：</span><div class="row"><ol class="col-xs-6 col-md-6 col-sm-6"><li>复制此商品链接或截图</li><li>长按识别二维码</li><li>发送商品链接在线咨询</li></ol><img class="col-xs-6 col-md-6 col-sm-6" src="/media/wysiwyg/jimmy-m-gong.all.gif" /></div></div>
<!--<div class="askPrice"><em class="porto-icon-info"></em><span>此处价格仅为参考。我们会根据你最终订单的金额和商品数量，形成新的最终报价。</span></div>-->
<a href="https://mp.weixin.qq.com/s?__biz=MzI5NjEwNzM0OA==&mid=401752313&idx=1&sn=15196f2fa6aa0fccb494232bfba1a5ab&scene=1&srcid=0107v3ZdOIEvZc9J4DyybrHE&key=41ecb04b05111003350e6e94f961b8ea1537286f85f401e51a64dd485bdbc667b27a0fb668cf38bc0ff14501db9c8406&ascene=1&uin=MTQ3NjEyMTIzNA==&devicetype=Windows-QQBrowser&version=61030003&pass_ticket=g2pwSKjkflhll8qihhaxIIwpghJ7aWH9DMGuXuophQX41ETJuJ24ywhk2vRgbZcB" class="distributor"><em class="porto-icon-gift"></em><span>我要分销: 长按识别二维码</span></a>
<img src="/media/wysiwyg/qr-meiwen.gif" />
SHORT_DESCRIPTION;

if ($_attributeLabel && $_attributeLabel == 'default') {
    $_attributeLabel = $_product->getResource()->getAttribute($_code)->getFrontendLabel();
}
if ($_attributeType && $_attributeType == 'text') {
    $_attributeValue = ($_helper->productAttribute($_product, $_product->$_call(), $_code)) ? $_product->getAttributeText($_code) : '';
} else {
    $_attributeValue = $_helper->productAttribute($_product, $_product->$_call(), $_code);
}
?>

<?php if (strcasecmp($_code, 'short_description') == 0): ?>
    <?php $_attributeValue = $sd; ?>
    <?php $_attributeLabel = 'none'; ?>
<?php endif; ?>
<?php if ($_attributeValue): ?>
    <div class="product attribute <?php /* @escapeNotVerified */ echo $_className?>">
        <?php if ($_attributeLabel != 'none'): ?><strong class="type"><?php /* @escapeNotVerified */ echo $_attributeLabel?></strong><?php endif; ?>
        <div class="value" <?php /* @escapeNotVerified */ echo $_attributeAddAttribute;?>><?php /* @escapeNotVerified */ echo $_attributeValue; ?></div>
    </div>
<?php endif; ?>
